<template>
  <div @click="itemClick">
    {{ d.title }}-{{ title }}
  </div>
</template>

<script setup lang="ts">
import { reactive } from 'vue'

interface IProps {
  title: string
}
const d = reactive({
  title: 'setupDemoTitle'
})
const props = withDefaults(defineProps<IProps>(), {
  title: '',
})

const emits = defineEmits(['itemClick'])
function itemClick() {
  emits('itemClick', 'itemClick')
}
defineExpose({
  itemClick,
  d,
  title: props.title
})
</script>
<style lang="scss" scope></style>
